package com.example.statemachine.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConditionalOnClass(name = "com.example.statemachine.core.StateMachineEngine")
@EnableConfigurationProperties(StateMachineProperties.class)
public class StateMachineAutoConfiguration {

    @Bean
    @ConditionalOnMissingBean
    public StateMachineProperties stateMachineProperties() {
        return new StateMachineProperties();
    }
}